/*
 * Copyright (C) 2023 xuexiangjys(xuexiangjys@163.com)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */

package com.xuexiang.templateproject.http;

import androidx.exifinterface.media.ExifInterface;
//import anet.channel.strategy.dispatch.DispatchConstants;
import kotlin.Metadata;
import kotlin.jvm.internal.Intrinsics;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

public final class BaseResponse<T> {
    private final T content;
    private final int errCode;
    @NotNull
    private final String errMsg;
    @NotNull
    private final String loginSessionId;

    public BaseResponse(int i2, @NotNull String errMsg, @NotNull String loginSessionId, T t) {
        Intrinsics.checkNotNullParameter(errMsg, "errMsg");
        Intrinsics.checkNotNullParameter(loginSessionId, "loginSessionId");
        this.errCode = i2;
        this.errMsg = errMsg;
        this.loginSessionId = loginSessionId;
        this.content = t;
    }

    /* JADX WARN: Multi-variable type inference failed */
    public static /* synthetic */ BaseResponse copy$default(BaseResponse baseResponse, int i2, String str, String str2, Object obj, int i3, Object obj2) {
        if ((i3 & 1) != 0) {
            i2 = baseResponse.errCode;
        }
        if ((i3 & 2) != 0) {
            str = baseResponse.errMsg;
        }
        if ((i3 & 4) != 0) {
            str2 = baseResponse.loginSessionId;
        }
        if ((i3 & 8) != 0) {
            obj = baseResponse.content;
        }
        return baseResponse.copy(i2, str, str2, obj);
    }

    public final int component1() {
        return this.errCode;
    }

    @NotNull
    public final String component2() {
        return this.errMsg;
    }

    @NotNull
    public final String component3() {
        return this.loginSessionId;
    }

    public final T component4() {
        return this.content;
    }

    @NotNull
    public final BaseResponse<T> copy(int i2, @NotNull String errMsg, @NotNull String loginSessionId, T t) {
        Intrinsics.checkNotNullParameter(errMsg, "errMsg");
        Intrinsics.checkNotNullParameter(loginSessionId, "loginSessionId");
        return new BaseResponse<>(i2, errMsg, loginSessionId, t);
    }

    public boolean equals(@Nullable Object obj) {
        if (this == obj) {
            return true;
        }
        if (!(obj instanceof BaseResponse)) {
            return false;
        }
        BaseResponse baseResponse = (BaseResponse) obj;
        return this.errCode == baseResponse.errCode && Intrinsics.areEqual(this.errMsg, baseResponse.errMsg) && Intrinsics.areEqual(this.loginSessionId, baseResponse.loginSessionId) && Intrinsics.areEqual(this.content, baseResponse.content);
    }

    public final T getContent() {
        return this.content;
    }

    public final int getErrCode() {
        return this.errCode;
    }

    @NotNull
    public final String getErrMsg() {
        return this.errMsg;
    }

    @NotNull
    public final String getLoginSessionId() {
        return this.loginSessionId;
    }

    public int hashCode() {
        int hashCode = ((((this.errCode * 31) + this.errMsg.hashCode()) * 31) + this.loginSessionId.hashCode()) * 31;
        T t = this.content;
        return hashCode + (t == null ? 0 : t.hashCode());
    }

    @NotNull
    public String toString() {
        return "BaseResponse(errCode=" + this.errCode + ", errMsg=" + this.errMsg + ", loginSessionId=" + this.loginSessionId + ", content=" + this.content + ')';
    }
}